﻿Imports System.ServiceModel

<ServiceBehavior(AddressFilterMode:=AddressFilterMode.Any)> _
Public Class RequestProcessor
  Inherits Albatross.ServerSide.WCF.WcfRequestProcessorForDotNetClient

End Class

' A few notes on the Azure host for Albatross:
'
' 1) Due to the Windows Azure load balancer, we have to add the "<ServiceBehavior(AddressFilterMode:=AddressFilterMode.Any)> _" attribute - that's the reason for this class.
'
'    Make sure you add a reference to System.ServiceModel and then inherit from Albatross.ServerSide.WCF.WcfRequestProcessorForDotNetClient - your markup (.svc file) then becomes:
'      <%@ ServiceHost Language="VB" Debug="true" Service="Albatross_WebRole.WcfRequestProcessorForDotNetClient" %>
'    
'    Then update your Web.Config to use your class - in <system.serviceModel> - <services>:
'      <service name="Albatross_WebRole.RequestProcessor" behaviorConfiguration="Albatross.RequestProcessor.Behavior">
'
' 2) Add this to your Web.Config:
' <behavior name="LoadBalancedBehavior">
'   <serviceMetadata httpGetEnabled="true" />
'   <!-- This is only needed if you need the WSDL on development - comment it out when using Albatross, especially in the Azure Staging/Production cloud -->
'   <!-- <useRequestHeadersForMetadataAddress>
'     <defaultPorts>
'       <add scheme="http" port="9000" />
'     </defaultPorts>
'   </useRequestHeadersForMetadataAddress> -->
' </behavior>

' 3) As with any Azure hosted web role you must add references to any DLLs you need at runtime.
'    In our Azure host sample we had to add a reference to Contracts.dll and Entities.dll
'    - just having a reference to RequestHandlers.dll was not enough

' 4) More considerations for WCF on Azure found here: http://code.msdn.microsoft.com/wcfazure/Wiki/View.aspx?title=KnownIssues -
'    Note that with Azure 1.0, using 'Add Service Reference' or svcutil to generate a proxy to a service hosted either in the development fabric or the cloud fabric will fail. 
'    But we don't need to worry about that with Albatross - we don't need no stinkin' WSDL.